<%--
  Created by IntelliJ IDEA.
  User: MySunshine
  Date: 2022/10/28
  Time: 15:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<head>
    <title>个人信息管理</title>
    <link rel="stylesheet" href="../../layui/css/layui.css">
    <style>
        body{
            background-color:  #073763;
            color: wheat;
        }
        h1{
            color: #e4a74c;
            text-align: center;
            padding: 40px;
            position: relative;
            left:5%;
        }
        img{
            width: 80px;
            height: 80px;
            border-radius: 50%;
            position: relative;
            left:40%;
            bottom:20px;
        }
        .b{
            position: relative;
            left:25%;

        }
    </style>
</head>
<body>
<div class="layui-row layui-col-md6 layui-col-md-offset3 " >
    <h1>个人信息管理</h1>
    <form class="layui-form" action="/UserUpdate">

        <div class="layui-form-item">
            <label class="layui-form-label">管理员头像</label>
            <div class="layui-input-block">
                <img src="../../userimg/${user.img}" alt="">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">账号</label>
            <div class="layui-input-block">
                <input type="text" name="num" value="${user.unum}" readonly autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">姓名</label>
            <div class="layui-input-block">
                <input type="text" name="name" value="${user.name}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">密码</label>
            <div class="layui-input-block">
                <input type="password" name="pwd"  placeholder="如需修改请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">年龄</label>
            <div class="layui-input-block">
                <input type="number" name="age"   max="150" min="10"  value="${user.age}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">性别</label>
            <div class="layui-input-block">
                <input type="radio" name="sex" value="男" title="男">
                <input type="radio" name="sex" value="女" title="女" checked>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">电话</label>
            <div class="layui-input-block">
                <input type="tel" name="phone" pattern="^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$"     placeholder="${user.phone}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">喜欢类型</label>
            <div class="layui-input-block">
                <select  name="kid" lay-verify="required" >
                    <option value="${user.kid}">如需修改请选择</option>
                    <c:forEach var="k" items="${kinds}" >
                        <option  value="${k.kid}">${k.kind}</option>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="layui-form-item b">
            <div class="layui-input-block">
                <button type="reset" class="layui-btn layui-btn-warm" onclick="window.history.back(-1)">返回</button>
                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">提交</button>
                <button type="reset" class="layui-btn layui-btn-danger">重置</button>
            </div>
        </div>
    </form>
</div>

<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
</script>

</body>
<script src="../../layui/layui.js"></script>
</html>